#include <iostream>
#include "Implement_bai9_03.h"

using namespace std;

Regtangle::Regtangle(float w, float l) : width(w), length(l) { }
float Regtangle::area(){
	return width*length;
}

void Regtangle::showRegtangle(){
	cout<<"Regtangle have width = "<<width<<", length = "<<length<<". And have area = "<<area()<<endl;
}

Box::Box(float w, float l, float h) : Regtangle(w, l), height(h){ }

float Box::area(){
	return Regtangle::area()*2 + Regtangle::length * height * 2 + Regtangle::width * height * 2;
}

float Box::volumn(){
	return width*length*height;
}
void Box::showBox(){
	cout<<"Box have width = "<<width<<", length = "<<length<<", height = "<<height
		<<". And have area = "<<area()<<", volumn = "<<volumn()<<endl;
}